#ifndef CHART_H
#define CHART_H

#include<QWidget>
#include<QtCharts/QChartView>
#include<QtCharts/QLineSeries>
#include<QtCharts/QValueAxis>
#include<QVBoxLayout>
#include<QTimer>
#include<QDebug>
#include<QLabel>

class Chart : public QWidget
{
    Q_OBJECT
public:
    explicit Chart(QWidget *parent=nullptr);
    ~Chart();
    void updateChart();
    double *sensor;
    int *position;

private:
    QtCharts::QChart *chart1;
    QtCharts::QLineSeries *series1;
    QtCharts::QValueAxis *axisX1;
    QtCharts::QValueAxis *axisY1;

    QtCharts::QChart *chart2;
    QtCharts::QLineSeries *series2;
    QtCharts::QValueAxis *axisX2;
    QtCharts::QValueAxis *axisY2;

    QGraphicsSimpleTextItem *lastTextItem1;
    QGraphicsSimpleTextItem *lastTextItem2;

    int x=0;
    int x1=0;
};

#endif // CHART_H
